package _05SingleTonDesignPattern;

public class Main05 {

    public static void main(String[] args) {
        /**
         * 单例模式之饿汉式
         */
        Person person1=Person.getPerson();
        person1.setName("张三");
        Person person2=Person.getPerson();
        person2.setName("李四");
        System.out.println("person1:  "+person1.getName());
        System.out.println("person2:  "+person2.getName());
    }
}
